﻿using System;
using System.Collections.Generic;
using System.Xml;

namespace System
{
	/// <summary>
	/// Defines Extension-Methods for classes in the <see cref="System.Xml"/> namespace.
	/// </summary>
	public static class ArgusLibExtensions
	{
		public static bool MoveToNode(this XmlReader reader, XmlNodeType nodeType, bool skipCurrent)
		{
			if (skipCurrent == true)
			{
				if (reader.Read() == false)
					return false;
			}
			while (reader.NodeType != nodeType)
			{
				if (reader.Read() == false)
					return false;
			}
			return true;
		}
	}
}
